home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2002 #16 / K-CD 16-2002.ISO / VIA 4-i-1 driver / WINNT / VIAIDE.INF < prev   
INI File  |  2002-03-04  |  22KB  |  724 lines

  1. ;-----------------------------------------------------------------------
  2. ; OPTION TYPE
  3. ; -----------
  4. ; This identifies the Option type we are dealing with.  The different
  5. ; possible types are:
  6. ;
  7. ; COMPUTER, VIDEO, POINTER, KEYBOARD, LAYOUT, SCSI, TAPE, PRINTER, ...
  8. ;-----------------------------------------------------------------------
  9.  
  10. [Identification]
  11.     OptionType = SCSI
  12.  
  13. ;-----------------------------------------------------------------------
  14. ; LANGUAGES SUPPORTED
  15. ; -------------------
  16. ;
  17. ; The languages supported by the INF, For every language supported
  18. ; we need to have a separate text section for every displayable text
  19. ; section.
  20. ;
  21. ;-----------------------------------------------------------------------
  22.  
  23. [LanguagesSupported]
  24.     ENG
  25.  
  26.  
  27. ;-----------------------------------------------------------------------
  28. ; OPTION LIST
  29. ; -----------
  30. ; This section lists the Option key names.  These keys are locale
  31. ; independent and used to represent the option in a locale independent
  32. ; manner.
  33. ;
  34. ;-----------------------------------------------------------------------
  35.  
  36. [Options]
  37.     "VIADSK"    = viadsk
  38.  
  39. ;-----------------------------------------------------------------------
  40. ; OPTION TEXT SECTION
  41. ; -------------------
  42. ; These are text strings used to identify the option to the user.  There
  43. ; are separate sections for each language supported.  The format of the
  44. ; section name is "OptionsText" concatenated with the Language represented
  45. ; by the section.
  46. ;
  47. ;-----------------------------------------------------------------------
  48.  
  49. [OptionsTextENG]
  50.     "VIADSK"    = "VIA bus master IDE drivers"
  51.  
  52.  
  53. ;-----------------------------------------------------------------------------------------
  54. ; SCSI MINIPORT DRIVERS:
  55. ;
  56. ; Order of the information:
  57. ;
  58. ; Class driver = Type, Group, ErrorControl, Tag, EventMessageFile, TypesSupported
  59. ;
  60. ;-----------------------------------------------------------------------------------------
  61.  
  62. [MiniportDrivers]
  63.     viadsk  = !SERVICE_KERNEL_DRIVER, "SCSI Miniport", !SERVICE_ERROR_NORMAL,  17, %SystemRoot%\System32\IoLogMsg.dll , 7
  64.  
  65. ;---------------------------------------------------------------------------
  66. ; 1. Identify
  67. ;
  68. ; DESCRIPTION:   To verify that this INF deals with the same type of options
  69. ;                as we are choosing currently.
  70. ;
  71. ; INPUT:         None
  72. ;
  73. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL
  74. ;                $($R1): Option Type (COMPUTER ...)
  75. ;                $($R2): Diskette description
  76. ;---------------------------------------------------------------------------
  77.  
  78. [Identify]
  79.     ;
  80.     ;
  81.     read-syms Identification
  82.  
  83.     set Status     = STATUS_SUCCESSFUL
  84.     set Identifier = $(OptionType)
  85.     set Media      = #("Source Media Descriptions", 1, 1)
  86.  
  87.     Return $(Status) $(Identifier) $(Media)
  88.  
  89.  
  90.  
  91. ;------------------------------------------------------------------------
  92. ; 2. ReturnOptions:
  93. ;
  94. ; DESCRIPTION:   To return the option list supported by this INF and the
  95. ;                localised text list representing the options.
  96. ;
  97. ;
  98. ; INPUT:         $($0):  Language used. ( ENG | FRN | ... )
  99. ;
  100. ; OUTPUT:        $($R0): STATUS: STATUS_SUCCESSFUL |
  101. ;                                STATUS_NOLANGUAGE
  102. ;                                STATUS_FAILED
  103. ;
  104. ;                $($R1): Option List
  105. ;                $($R2): Option Text List
  106. ;------------------------------------------------------------------------
  107.  
  108. [ReturnOptions]
  109.     ;
  110.     ;
  111.     set Status        = STATUS_FAILED
  112.     set OptionList     = {}
  113.     set OptionTextList = {}
  114.  
  115.     ;
  116.     ; Check if the language requested is supported
  117.     ;
  118.     set LanguageList = ^(LanguagesSupported, 1)
  119.     Ifcontains(i) $($0) in $(LanguageList)
  120.     goto returnoptions
  121.     else
  122.     set Status = STATUS_NOLANGUAGE
  123.     goto finish_ReturnOptions
  124.     endif
  125.  
  126.     ;
  127.     ; form a list of all the options and another of the text representing
  128.     ;
  129.  
  130. returnoptions = +
  131.     set OptionList     = ^(Options, 0)
  132.     set OptionTextList = ^(OptionsText$($0), 1)
  133.     set Status         = STATUS_SUCCESSFUL
  134.  
  135. finish_ReturnOptions = +
  136.     Return $(Status) $(OptionList) $(OptionTextList)
  137.  
  138.  
  139. ;
  140. ; 3. InstallOption:
  141. ;
  142. ; FUNCTION:  To copy files representing Options
  143. ;            To configure the installed option
  144. ;            To update the registry for the installed option
  145. ;
  146. ; INPUT:     $($0):  Language to use
  147. ;            $($1):  OptionID to install
  148. ;            $($2):  SourceDirectory
  149. ;            $($3):  AddCopy  (YES | NO)
  150. ;            $($4):  DoCopy   (YES | NO)
  151. ;            $($5):  DoConfig (YES | NO)
  152. ;
  153. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  154. ;                            STATUS_NOLANGUAGE |
  155. ;                            STATUS_USERCANCEL |
  156. ;                            STATUS_FAILED
  157. ;
  158.  
  159. [InstallOption]
  160.  
  161.     ;
  162.     ; Set parameters for VIA IDE
  163.     ;
  164.     set SndChIRQ        = 15
  165.     set Disk0_DMA_Time  = 120
  166.     set Disk0_PIO_Time  = 120
  167.     set Disk0_DMA_Mode  = 1
  168.     set Disk0_Blk_Size  = 16 
  169.     set Disk1_DMA_Time  = 0
  170.     set Disk1_PIO_Time  = 0
  171.     set Disk1_DMA_Mode  = 1
  172.     set Disk1_Blk_Size  = 0
  173.     set Disk2_DMA_Time  = 0
  174.     set Disk2_PIO_Time  = 0
  175.     set Disk2_DMA_Mode  = 1
  176.     set Disk2_Blk_Size  = 0
  177.     set Disk3_DMA_Time  = 0
  178.     set Disk3_PIO_Time  = 0
  179.     set Disk3_DMA_Mode  = 1
  180.     set Disk3_Blk_Size  = 0
  181.  
  182.     ;
  183.     ; Delete VIAIDE service key to modify parameters
  184.     ;
  185.     shell "utility.inf" RemoveService viaide "NO"
  186.  
  187.     ;
  188.     ; Set default values for
  189.     ;
  190.     set Status = STATUS_FAILED
  191.     set DrivesToFree = {}
  192.  
  193.     ;
  194.     ; extract parameters
  195.     ;
  196.     set Option   = $($1)
  197.     set SrcDir   = $($2)
  198.     set AddCopy  = $($3)
  199.     set DoCopy   = $($4)
  200.     set DoConfig = $($5)
  201.  
  202.     ;
  203.     ; Check if the language requested is supported
  204.     ;
  205.     set LanguageList = ^(LanguagesSupported, 1)
  206.     Ifcontains(i) $($0) in $(LanguageList)
  207.     else
  208.     set Status = STATUS_NOLANGUAGE
  209.     goto finish_InstallOption
  210.     endif
  211.     read-syms Strings$($0)
  212.  
  213.     ;
  214.     ; check to see if Option is supported.
  215.     ;
  216.  
  217.     set OptionList = ^(Options, 0)
  218.     ifcontains $(Option) in $(OptionList)
  219.     else
  220.     Debug-Output "SCSI.INF: SCSI option is not supported."
  221.     goto finish_InstallOption
  222.     endif
  223.     set OptionList = ""
  224.  
  225.     ;
  226.     ; Option has been defined already
  227.     ;
  228.  
  229.     set MiniportDriver   =   #(Options,         $(Option),         1)
  230.     set Type             = $(#(MiniportDrivers, $(MiniportDriver), 1))
  231.     set Group            =   #(MiniportDrivers, $(MiniportDriver), 2)
  232.     set ErrorControl     = $(#(MiniportDrivers, $(MiniportDriver), 3))
  233.     set Tag              =   #(MiniportDrivers, $(MiniportDriver), 4)
  234.     set EventMessageFile =   #(MiniportDrivers, $(MiniportDriver), 5)
  235.     set TypesSupported   =   #(MiniportDrivers, $(MiniportDriver), 6)
  236.  
  237.     set Start            =   $(!SERVICE_BOOT_START)
  238.  
  239.     set ReferenceBIOS    = 0;
  240.     ; ReferenceBIOS is a flag for specified customer used.
  241.  
  242. installtheoption = +
  243.  
  244.     ;
  245.     ; Code to add files to copy list
  246.     ;
  247.  
  248. ;hc01_s
  249. ;*set AddCopy = NO
  250. ;hc01_e
  251.  
  252.     ifstr(i) $(AddCopy) == "YES"
  253.     set DoActualCopy = NO
  254.     set FileToCheck = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  255.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\drivers\"$(FileToCheck)
  256.     ifstr(i) $(STATUS) == NO
  257.         set DoActualCopy = YES
  258.     endif
  259.  
  260.     ifstr(i) $(DoActualCopy) == NO
  261.         shell "subroutn.inf" DriversExist $($0) $(String1)
  262.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  263.         Debug-Output "SCSI.INF: shelling DriversExist failed"
  264.         goto finish_InstallOption
  265.         endif
  266.  
  267.         ifstr(i) $($R0) == STATUS_CURRENT
  268.         else-ifstr(i) $($R0) == STATUS_NEW
  269.         set DoActualCopy = YES
  270.         else-ifstr(i) $($R0) == STATUS_USERCANCEL
  271.         Debug-Output "SCSI.INF: User cancelled SCSI installation"
  272.         goto finish_InstallOption
  273.         else
  274.         Debug-Output "SCSI.INF: Error reported in DriversExist routine in SUBROUTN.INF"
  275.         goto finish_InstallOption
  276.         endif
  277.     endif
  278.  
  279.     ifstr(i) $(DoActualCopy) == YES
  280.  
  281.         shell "subroutn.inf" DoAskSourceEx $(SrcDir) $(String2)
  282.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  283.         Debug-Output "SCSI.INF: shelling DoAskSourceEx failed"
  284.         goto finish_InstallOption
  285.         endif
  286.  
  287.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  288.         set SrcDir = $($R1)
  289.         ifstr(i) $($R2) != ""
  290.             set DrivesToFree = >($(DrivesToFree), $($R2))
  291.         endif
  292.         else
  293.         Debug-Output "SCSI.INF: User cancelled asking source."
  294.         goto finish_InstallOption
  295.         endif
  296.  
  297.         install Install-AddCopyOption
  298.         ifstr(i) $(STF_INSTALL_OUTCOME) != "STF_SUCCESS"
  299.         Debug-Output "Adding SCSI files to copy list failed"
  300.         goto finish_InstallOption
  301.         endif
  302.     else
  303.         set DoCopy = NO
  304.     endif
  305.  
  306.     endif
  307.  
  308. ;hc01_s
  309. ;*set DoCopy = NO
  310. ;hc01_e
  311.  
  312.     ifstr(i) $(DoCopy) == "YES"
  313.     read-syms ProgressCopy$($0)
  314.     install Install-DoCopyOption
  315.     ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_FAILURE"
  316.         Debug-Output "Copying files failed"
  317.         goto finish_InstallOption
  318.     else-ifstr(i) $(STF_INSTALL_OUTCOME) == "STF_USERQUIT"
  319.         set Status = STATUS_USERCANCEL
  320.         goto finish_InstallOption
  321.     endif
  322.     endif
  323. ;hc01_s
  324.     set DoConfig = YES
  325. ;hc01_e
  326.  
  327.     ifstr(i) $(DoConfig) == "YES"
  328.     ;
  329.     ; first run a privilege check on modifying the setup node
  330.     ;
  331.  
  332.     shell "registry.inf" CheckSetupModify
  333.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  334.         goto finish_InstallOption
  335.     endif
  336.  
  337.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  338.         goto finish_InstallOption
  339.     endif
  340.  
  341.     ;
  342.     ; then make a new SCSI entry, the entry is created automatically
  343.     ; enabled
  344.     ;
  345.  
  346.     set ServiceNode   = $(MiniportDriver)
  347.     set ServiceBinary = System32\drivers\#(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  348.  
  349.     set ServicesValues   = { +
  350.         {Type,           0, $(!REG_VT_DWORD),     $(Type)                  }, +
  351.         {Start,          0, $(!REG_VT_DWORD),     $(Start)                 }, +
  352.         {Group,          0, $(!REG_VT_SZ),        $(Group)                 }, +
  353.         {ErrorControl,   0, $(!REG_VT_DWORD),     $(ErrorControl)          }, +
  354.         {Tag,            0, $(!REG_VT_DWORD),     $(Tag)                   }, +
  355.         {BinaryPathName, 0, $(!REG_VT_EXPAND_SZ), $(ServiceBinary)         }, +
  356.         {ReferenceBIOS,  0, $(!REG_VT_DWORD),     $(ReferenceBIOS)         }, +
  357.         }
  358.  
  359.     set DeviceValues     = {}
  360.     set EventLogValues   = { +
  361.         {EventMessageFile, 0, $(!REG_VT_EXPAND_SZ), $(EventMessageFile) }, +
  362.         {TypesSupported,   0, $(!REG_VT_DWORD),     $(TypesSupported)   }  +
  363.         }
  364.  
  365.     ;
  366.     ; These parameters will be at
  367.     ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\SNDCHIRQ
  368.     ;
  369.     set ParametersValues = { +
  370.         {SNDCHIRQ,     0, $(!REG_VT_DWORD),    $(SndChIRQ)  }, +
  371.         }
  372.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  373.                         $(ServicesValues)   +
  374.                         $(ParametersValues) +
  375.                         $(DeviceValues)     +
  376.                         $(EventLogValues)   +
  377.                         SNDCHIRQ
  378.     ;
  379.     ; These parameters will be at
  380.     ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters0
  381.     ;
  382. ;HC_02S
  383.     set ParametersValues = { +
  384. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk0_DMA_Time) }, +
  385. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk0_PIO_Time) }, +
  386.         {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk0_DMA_Mode) }, +
  387. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk0_Blk_Size) }, +
  388.            }
  389. ;HC_02E
  390.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  391.                         $(ServicesValues)   +
  392.                         $(ParametersValues) +
  393.                         $(DeviceValues)     +
  394.                         $(EventLogValues)   +
  395.                         Parameters0
  396.     ;
  397.     ; These parameters will be at
  398.     ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters1
  399.     ;
  400. ;HC_02S
  401.     set ParametersValues = { +
  402. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk1_DMA_Time) }, +
  403. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk1_PIO_Time) }, +
  404.         {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk1_DMA_Mode) }, +
  405. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk1_Blk_Size) }, +
  406.         }
  407. ;HC_02E
  408.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  409.                         $(ServicesValues)   +
  410.                         $(ParametersValues) +
  411.                         $(DeviceValues)     +
  412.                         $(EventLogValues)   +
  413.                         Parameters1
  414.     ;
  415.     ; These parameters will be at
  416.     ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters2
  417.     ;
  418. ;HC_02S
  419.     set ParametersValues = { +
  420. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk2_DMA_Time) }, +
  421. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk2_PIO_Time) }, +
  422.         {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk2_DMA_Mode) }, +
  423. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk2_Blk_Size) }, +
  424.         }
  425. ;HC_02E
  426.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  427.                         $(ServicesValues)   +
  428.                         $(ParametersValues) +
  429.                         $(DeviceValues)     +
  430.                         $(EventLogValues)   +
  431.                         Parameters2
  432.     ;
  433.     ; These parameters will be at
  434.     ;  \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\viadsk\Parameters3
  435.     ;
  436. ;HC_02S
  437.     set ParametersValues = { +
  438. ;                {DMA_TIME,     0, $(!REG_VT_DWORD),    $(Disk3_DMA_Time) }, +
  439. ;                {PIO_TIME,     0, $(!REG_VT_DWORD),    $(Disk3_PIO_Time) }, +
  440.         {SET_DMAM,     0, $(!REG_VT_DWORD),    $(Disk3_DMA_Mode) }, +
  441. ;                {BLCKSIZE,     0, $(!REG_VT_DWORD),    $(Disk3_Blk_Size) }, +
  442.         }
  443. ;HC_02E
  444.     shell "registry.inf"  MakeServicesEntry $(ServiceNode)      +
  445.                         $(ServicesValues)   +
  446.                         $(ParametersValues) +
  447.                         $(DeviceValues)     +
  448.                         $(EventLogValues)   +
  449.                         Parameters3
  450.  
  451.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  452.         Debug-Output "Couldn't execute MakeServicesEntry in registry.inf"
  453.         goto finish_InstallOption
  454.     endif
  455.  
  456.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  457.         Debug-Output "MakeServicesEntry failed for SCSI"
  458.         goto finish_InstallOption
  459.     endif
  460. ;Frank_S
  461.     shell "registry.inf" ModifyServicesEntry atapi $(!SERVICE_DISABLED)
  462.     shell "registry.inf" ModifyServicesEntry atdisk $(!SERVICE_DISABLED)
  463. ;HC03_S
  464.     shell "registry.inf" GetServicesEntryStart "imgatapi"
  465.     ifstr(i) $($R0) == "STATUS_SUCCESSFUL"
  466.     shell "registry.inf" ModifyServicesEntry imgatapi $(!SERVICE_DISABLED)
  467.     endif
  468. ;HC03_E
  469.     set KeyName = "Software\Microsoft\Windows NT\CurrentVersion"
  470.     OpenRegKey $(!REG_H_LOCAL) "" $(KeyName) $(!REG_KEY_READ) KeyHandle
  471.     ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  472.       Debug-Output "REGISTRY.INF: Couldn't open windows nt software key for read access"
  473.       goto finish_InstallOption
  474.     endif
  475.  
  476.     GetRegValue $(KeyHandle) "CurrentVersion" VerInf
  477.     set NtVer  = *($(VerInf),4)
  478.  
  479. ;        ifstr(i) $(NtVer) == "4.0"
  480. ;          shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  481. ;          shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  482. ;        endif
  483.  
  484.     ifstr(i) $(NtVer) == "3.50"
  485.       shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  486.       shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  487.     endif
  488.     ifstr(i) $(NtVer) == "3.51"
  489.       shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  490.       shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  491.     endif
  492.     CloseRegKey $(KeyHandle)
  493.     ;shell "registry.inf" ModifyServicesEntry scsidisk $(!SERVICE_BOOT_START)
  494.     ;shell "registry.inf" ModifyServicesEntry scsicdrm $(!SERVICE_SYSTEM_START)
  495.     ;shell "registry.inf" ModifyServicesEntry atapi $(!SERVICE_DISABLED)
  496.     ;shell "registry.inf" ModifyServicesEntry atdisk $(!SERVICE_DISABLED)
  497. ;Frank_E
  498.     endif
  499.  
  500.     set Status = STATUS_SUCCESSFUL
  501. finish_InstallOption = +
  502.     ForListDo $(DrivesToFree)
  503.     LibraryProcedure STATUS,$(!LIBHANDLE), DeleteNetConnection $($) "TRUE"
  504.     EndForListDo
  505.  
  506.     Return $(Status)
  507.  
  508.  
  509. [Install-AddCopyOption]
  510.  
  511.     ;
  512.     ; Add the files to the copy list
  513.     ;
  514.     AddSectionKeyFileToCopyList   Files-ScsiMiniportDrivers         +
  515.                   $(MiniportDriver)                 +
  516.                   $(SrcDir)                      +
  517.                   $(!STF_WINDOWSSYSPATH)\drivers
  518.  
  519.     exit
  520.  
  521.  
  522. [Install-DoCopyOption]
  523.  
  524.     ;
  525.     ; Copy files in the copy list
  526.     ;
  527.     CopyFilesInCopyList
  528.     exit
  529.  
  530. ;-------------------------------------------------------------------------
  531. ; 4. DeInstallOption:
  532. ;
  533. ; FUNCTION:  To remove files representing Option
  534. ;            To remove the registry entry corresponding to the Option
  535. ;
  536. ; INPUT:     $($0):  Language to use
  537. ;            $($1):  OptionID to install
  538. ;
  539. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  540. ;                            STATUS_NOLANGUAGE |
  541. ;                            STATUS_USERCANCEL |
  542. ;                            STATUS_FAILED
  543. ;-------------------------------------------------------------------------
  544. [DeInstallOption]
  545.     ;
  546.     ; Set default values for
  547.     ;
  548.     set Status   = STATUS_FAILED
  549.     ;
  550.     ; extract parameters
  551.     ;
  552.     set Option   = $($1)
  553.  
  554.     ;
  555.     ; Check if the language requested is supported
  556.     ;
  557.     set LanguageList = ^(LanguagesSupported, 1)
  558.     Ifcontains(i) $($0) in $(LanguageList)
  559.     else
  560.     set Status = STATUS_NOLANGUAGE
  561.     goto finish_DeInstallOption
  562.     endif
  563.     read-syms Strings$($0)
  564.  
  565.     ;
  566.     ; check to see if Option is supported.
  567.     ;
  568.  
  569.     set OptionList = ^(Options, 0)
  570.     ifcontains $(Option) in $(OptionList)
  571.     else
  572.     goto finish_DeInstallOption
  573.     endif
  574.     set OptionList = ""
  575.  
  576.     ;
  577.     ; fetch details about option
  578.     ;
  579.  
  580.     set MiniportDriver = #(Options, $(Option), 1)
  581.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  582.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  583.  
  584.     ;
  585.     ; check to see if file is installed
  586.     ; if not give success
  587.     ;
  588.  
  589.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  590.     ifstr(i) $(STATUS) == "NO"
  591.     set Status = STATUS_SUCCESSFUL
  592.     goto finish_DeInstallOption
  593.     endif
  594.  
  595.     shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  596.     ifstr(i) $($R0) != "STATUS_SUCCESSFUL"
  597.     ; this could happen if there is no start value or there is no
  598.     ; key, in which case the option is not installed
  599.     set Status = STATUS_SUCCESSFUL
  600.     goto finish_DeInstallOption
  601.     endif
  602.  
  603.     ifstr(i) $($R1) == $(!SERVICE_BOOT_START)
  604.     shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "WARNING" $(String3)
  605.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  606.         goto do_removal
  607.     endif
  608.     ifstr(i) $($R1) == "CANCEL"
  609.         goto finish_DeInstallOption
  610.     endif
  611.     endif
  612.  
  613. do_removal =+
  614.     ;
  615.     ; disable the registry entry
  616.     ;
  617.  
  618.     shell "registry.inf" RemoveServicesEntry $(MiniportDriver)
  619.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  620.     Debug-Output "SCSI.INF: Failed to shell RemoveServicesEntry"
  621.     goto finish_DeInstallOption
  622.     endif
  623.  
  624.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  625.     Debug-Output "SCSI.INF: Failed to disable services entry"
  626.     goto finish_DeInstallOption
  627.     endif
  628.  
  629.     ;
  630.     ; we won't remove the file because we can only do so during the next boot.
  631.     ; if the user chooses to reinstall the same driver during this boot
  632.     ; he will still end up deleting the driver on next boot. if the file
  633.     ; should be deleted a warning should be put up saying that the user should
  634.     ; not try to reinstall the driver during this boot
  635.     ;
  636.     ;    AddFileToDeleteList $(FilePath)
  637.  
  638.     set Status = STATUS_SUCCESSFUL
  639.  
  640. finish_DeInstallOption =+
  641.     return $(Status)
  642.  
  643.  
  644. ;-------------------------------------------------------------------------
  645. ; 5. GetInstalledOptions:
  646. ;
  647. ; FUNCTION:  To find out the list of options which are installed
  648. ;
  649. ; INPUT:     $($0): Language to Use
  650. ;
  651. ; OUTPUT:    $($R0): STATUS: STATUS_SUCCESSFUL |
  652. ;                            STATUS_FAILED
  653. ;
  654. ;            $($R1): List of options installed
  655. ;            $($R2): Option installed Text List
  656. ;-------------------------------------------------------------------------
  657. [GetInstalledOptions]
  658.     set Status = STATUS_FAILED
  659.     set InstalledOptions = {}
  660.     set InstalledOptionsText = {}
  661.  
  662.     ;
  663.     ; Check if the language requested is supported
  664.     ;
  665.     set LanguageList = ^(LanguagesSupported, 1)
  666.     Ifcontains(i) $($0) in $(LanguageList)
  667.     else
  668.     set Status = STATUS_NOLANGUAGE
  669.     goto finish_GetInstalledOptions
  670.     endif
  671.  
  672.     set OptionList = ^(Options, 0)
  673.     ForListDo $(OptionList)
  674.     set MiniportDriver = #(Options, $($), 1)
  675.     set MiniportFile   = #(Files-ScsiMiniportDrivers, $(MiniportDriver), 2)
  676.     set FilePath       = $(!STF_WINDOWSSYSPATH)"\drivers\"$(MiniportFile)
  677.     LibraryProcedure STATUS,$(!LIBHANDLE),CheckFileExistance $(FilePath)
  678.     ifstr(i) $(STATUS) == "YES"
  679.         shell "registry.inf" GetServicesEntryStart $(MiniportDriver)
  680.         ifint $($ShellCode) == $(!SHELL_CODE_OK)
  681.         ifstr(i) $($R0) == STATUS_SUCCESSFUL
  682.             ifstr(i) $($R1) != $(!SERVICE_DISABLED)
  683.  
  684.             set OptionText = #(OptionsText$($0), $($), 1)
  685.             set InstalledOptions     = >($(InstalledOptions), $($))
  686.             set InstalledOptionsText = >($(InstalledOptionsText), $(OptionText))
  687.  
  688.             endif
  689.         endif
  690.         endif
  691.     endif
  692.     EndForListDo
  693.     set Status = STATUS_SUCCESSFUL
  694. finish_GetInstalledOptions =+
  695.     Return $(Status) $(InstalledOptions) $(InstalledOptionsText)
  696.  
  697.  
  698. ;**************************************************************************
  699. ; PROGRESS GUAGE VARIABLES
  700. ;**************************************************************************
  701.  
  702. [ProgressCopyENG]
  703.     ProCaption   = "Windows NT Setup"
  704.     ProCancel    = "Cancel"
  705.     ProCancelMsg = "Windows NT is not correcly installed.  Are you sure you want "+
  706.            "to cancel copying files?"
  707.     ProCancelCap = "Setup Message"
  708.     ProText1     = "Copying:"
  709.     ProText2     = "To:"
  710.  
  711. [StringsENG]
  712.     String1 = "PCI IDE DISK Adapter"
  713.     String2 = "Please enter the full path to the VIA VT82C580 PCI IDE DISK "+
  714.           "Adapter file.  Then choose Continue."
  715.     String3 = "The VT82C580 PCI IDE DISK Adapter has been marked as a boot device.  Removing "+
  716.           "it may cause the system not to boot."$(!LF)$(!LF)"Are you sure "+
  717.           "you want to remove the Adapter."
  718.  
  719. [Source Media Descriptions]
  720.     1  = "VT82C580"  , TAGFILE = vtdisk
  721.  
  722. [Files-ScsiMiniportDrivers]
  723. viadsk = 1 , viadsk.sys , SIZE=999
  724.